package tjut.opp.testI22;

import javax.naming.spi.DirStateFactory.Result;

public class FiveJieCheng {

	public static void main(String[] args) {
		// 递归方法求5!
		System.out.println(jiecheng(5));
	}
	public static int jiecheng(int n){
		//当递归到jiecheng(1)的时赋值
		if(n==1){
			return 1;
		}
		int result=n*jiecheng(n-1);
		return result;
	}

}
